package cn.wolfcode.p2p.base.domain;

import java.util.HashMap;

import cn.wolfcode.base.BaseDomain;
import cn.wolfcode.p2p.base.util.JSONUtil;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * @author
 * @since 2018-11-23 17:58:22
 */
@Getter
@Setter
@Accessors(chain = true)
public class SystemDictionaryItem extends BaseDomain {
    /**
     * 数据字典明细标题
     */
    private String title;

    /**
     * 数据字典明细序号
     */
    private Byte sequence;

    /**
     * 所属数据字典分组ID
     */
    private Long parentId;

    public String getJsonString() {
        HashMap<String, Object> map = new HashMap<>();
        map.put("id", id);
        map.put("sequence", sequence);
        map.put("title", title);
        map.put("parentId", parentId);
        return JSONUtil.toJSONString(map);
    }
}